package com.teaching.Common;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;

public class Utils {
    public static String TimeStampTurnString(Long time) {
        Date date = new Date(time);
        String format = new SimpleDateFormat("HH:mm:ss").format(date);
        String[] split = format.split(":");

        return split[0] + "小时" + split[1] + "分钟";
    }

    public static String getString(HashMap map, String string) {
        return map.containsKey(string) ? (String) map.get(string) : null;
    }

    public static int getInteger(HashMap map, String string) {
        return map.containsKey(string) ? (int) map.get(string) : 0;

    }
}
